package io.lhj.chapter01;

import java.util.concurrent.TimeUnit;

public class TryConcurrency1 {

    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread()
        {
            @Override
            public void run()
            {
                try
                {
                    TimeUnit.SECONDS.sleep(1);
                } catch (InterruptedException e)
                {
                    e.printStackTrace();
                }
            }
        };
        thread.start();
        TimeUnit.SECONDS.sleep(2);//休眠主要是确保thread结束生命周期
        thread.start();//企图重新激活该线程
    }
}
